package com.ylzinfo.ms.utils;

import lombok.Data;

import java.util.Map;

/**
 * @Description:
 * @Product: IntelliJ IDEA
 * @Author Rogchen rogchen128@gmail.com
 * @Created Date: 2019/4/9 15:39
 **/
@Data
public class BigDataClient {

    private String resourceUrl;
    private String token;
    private String resourceId;
    private String paraType;
    private String key;
    private Map<String, Object> param;

    public BigDataClient(Builder builder) {
        this.resourceUrl = builder.resourceUrl;
        this.token = builder.token;
        this.resourceId = builder.resourceId;
        this.paraType = builder.paraType;
        this.key = builder.key;
        this.param = builder.param;
    }

    public static final class Builder {
        private String resourceUrl;
        private String token;
        private String resourceId;
        private String paraType;
        private String key;
        private Map<String, Object> param;

        public Builder resourceUrl(String data) {
            this.resourceUrl = data;
            return this;
        }

        public Builder token(String data) {
            this.token = data;
            return this;
        }

        public Builder resourceId(String data) {
            this.resourceId = data;
            return this;
        }

        public Builder paraType(String data) {
            this.paraType = data;
            return this;
        }

        public Builder key(String data) {
            this.key = data;
            return this;
        }

        public Builder param(Map<String, Object> data) {
            this.param = data;
            return this;
        }
        public BigDataClient build() {
            return new BigDataClient(this);
        }
    }

}
